package com.twu.biblioteca;

import java.io.PrintStream;

/**
 * Created with IntelliJ IDEA.
 * User: thoughtworker
 * Date: 10/13/13
 * Time: 4:01 PM
 * To change this template use File | Settings | File Templates.
 */
public class DisplayMembershipDetailsMenu implements MenuOptions{

    private final PrintStream printStream;
    private CurrentUser currentUser;

    public DisplayMembershipDetailsMenu(PrintStream printStream, CurrentUser currentUser) {

        this.printStream = printStream;
        this.currentUser = currentUser;
    }

    @Override
    public void execute() {

        if (currentUser.getUser() == null) {
            printStream.println("Please talk to a Librarian. Thank you.");
        } else {
            printStream.println(currentUser.getUser().displayInfo());
        }


    }
}
